Skip to content

feat: Add files upload / storage support#703

Merged
aXenDeveloper merged 2 commits into
canaryfrom
feat/storage
Jul 6, 2026
Merged

feat: Add files upload / storage support#703
aXenDeveloper merged 2 commits into
canaryfrom
feat/storage

Conversation

@aXenDeveloper

Copy link
Copy Markdown
Owner

Improving Documentation

Description

What?

Why?

@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vitnode-docs Ready Ready Preview, Comment Jul 6, 2026 6:37pm

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a pluggable storage adapter system for VitNode, enabling file uploads to be stored locally on disk or via cloud providers like AWS S3/Cloudflare R2 and Supabase Storage. It adds the core StorageModel with file validation and image optimization using sharp, database schemas for tracking files, and an admin panel interface to test the storage configuration. The review feedback highlights several opportunities to improve robustness, such as safely handling dynamic imports of sharp to avoid masking 500 errors as 400s, sanitizing slashes in URL construction, safely stripping path prefixes in static file serving, and utilizing optional chaining on context lookups to prevent potential runtime crashes.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/vitnode/src/api/models/storage.ts
Comment thread packages/vitnode/src/api/adapters/storage/local.ts
Comment thread apps/api/src/index.ts
Comment thread packages/vitnode/src/api/models/storage.ts
@aXenDeveloper aXenDeveloper marked this pull request as ready for review July 6, 2026 19:48
@aXenDeveloper aXenDeveloper merged commit 512aa01 into canary Jul 6, 2026
4 checks passed
@aXenDeveloper aXenDeveloper deleted the feat/storage branch July 6, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💡 Feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant